<template>
	<div>
		<Header></Header>
		<Cover title="多学科融合" subtitle="人工智能与软件工程" img="banner.png"></Cover>
		<div class="page-content">
			<div class="lab-title">未来媒体实验室</div>
			<div class="lab-intro">
				<div class="lab-intro-info">
					<div class="lab-intro-info__content">{{ content1 }}</div>
					<div class="lab-intro-info__content">{{ content2 }}</div>
					<el-button type="primary" @click="gotoNews" class="go" round>去看看 <i class="el-icon-arrow-right el-icon-right"></i></el-button>
				</div>
				<!-- <img class="lab-intro-img" :src="image" /> -->
				<video class="lab-intro-img" controls
      autoplay
      muted
      loop src=" https://wuminghui.top:9000/wlmtsys/清华大学未来实验室.mp4 " ></video>
			</div>
		</div>
		<!-- <div class="page-content">
			<div class="menu">{{ title }}</div>
			<div class="info">
				<div class="info-left">
					<p>
						{{ content1 }}
											</p>
					<p>
						{{ content2 }}
									</p>
					<el-button type="primary" class="go" @click="gotoNews" round>去看看 <i class="el-icon-arrow-right el-icon-right"></i></el-button>
				</div>
				<img :src="image" alt="" />
			</div>
		</div> -->
		<Footer></Footer>
	</div>
</template>

<script>
import axios from '../config/http';
export default {
	name: 'Index',
	components: {
		Header: () => import("@/components/Header.vue"),
		Cover: () => import('@/components/Cover.vue'),
    Footer: () => import("@/components/Footer.vue")
	},
	data() {
		return {
			image: '',
			title: '',
			content1: '',
			content2: '',
			comtableData: [],
			page: 1,
			pageSize: 15,
			search: '',
			form: {
				companyid: '',
				taskid: ''
			}
		};
	},

	created() {
		this.loadData();
	},
	methods: {
		gotoNews() {
			this.$router.push('/news');
		},
		async loadData() {
			// 获取首页介绍
			let res = await axios.get(`/is/info/intro`);
			this.title = res.data.data.data[0].title;
			this.content1 = res.data.data.data[0].content1;
			this.content2 = res.data.data.data[0].content2;
			this.image = res.data.data.data[0].image;
		}
	}
};
</script>

<style lang="less">
/* 变量定义 */
@primary-color: #00ff9d;
@bg-light: #fff;
@text-dark: #2c3e50;
@fs-base: 16px;
@fs-large: 24px;
@fs-small: 14px;

.page-content {
  position: relative;
  background: @bg-light;
  color: @text-dark;
  padding: 40px;
  overflow: hidden;

  &::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: 
      radial-gradient(circle at center, @bg-light 0%, transparent 70%),
      repeating-linear-gradient(transparent 0%, transparent 2px, rgba(0, 255, 157, 0.1) 3px, transparent 3px, transparent 9px),
      repeating-linear-gradient(90deg, transparent 0%, transparent 2px, rgba(0, 255, 157, 0.1) 3px, transparent 3px, transparent 9px);
    animation: matrix 20s linear infinite;
    opacity: 0.2;
    z-index: 0;
  }

  .lab-title {
    position: relative;
    font-size: @fs-large;
    font-weight: 700;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    color: @text-dark;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
    letter-spacing: 2px;
    animation: textGlow 2s infinite alternate;

    &::after {
      content: '';
      position: absolute;
      bottom: -10px;
      left: 0;
      width: 100%;
      height: 2px;
      background: linear-gradient(90deg, transparent, @primary-color, transparent);
      animation: scanLine 2s linear infinite;
    }
  }

  .lab-intro {
    position: relative;
    font-size: @fs-base;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 50px;
    animation: floatUp 1s ease-in-out;
    z-index: 1;

    &-info {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 20px;
      padding: 20px;
      background: rgba(255, 255, 255, 0.9);
      border-radius: 12px;
      box-shadow: 0 0 30px rgba(0, 255, 157, 0.15);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(0, 255, 157, 0.2);
      animation: contentGlow 3s infinite alternate;

      &__content {
        font-family: 'Avenir', Helvetica, Arial, sans-serif;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-align: justify;
        color: @text-dark;
        line-height: 1.8;
        position: relative;
        padding: 15px;
        
        &::before {
          content: '';
          position: absolute;
          left: 0;
          top: 0;
          width: 2px;
          height: 100%;
          background: @primary-color;
          animation: heightAnim 2s ease-in-out infinite;
        }
      }

      .go {
        margin-top: auto;
        margin-left: auto;
        background: transparent;
        border: 1px solid @primary-color;
        color: @primary-color;
        position: relative;
        overflow: hidden;
        transition: all 0.3s;
        
        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: -100%;
          width: 100%;
          height: 100%;
          background: linear-gradient(90deg, transparent, rgba(0, 255, 157, 0.2), transparent);
          animation: btnGlow 3s infinite;
        }

        &:hover {
          box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
          text-shadow: 0 0 5px @primary-color;
          background: rgba(0, 255, 157, 0.1);
          transform: translateY(-2px);
        }

        .el-icon-right {
          animation: arrowMove 1s infinite;
        }
      }
    }

    &-img {
      width: 100%;
      height: 500px;
      object-fit: cover;
      border-radius: 12px;
      box-shadow: 0 0 30px rgba(0, 255, 157, 0.2);
      border: 1px solid rgba(0, 255, 157, 0.2);
      transition: all 0.3s;

      &:hover {
        transform: scale(1.02);
        box-shadow: 0 0 40px rgba(0, 255, 157, 0.3);
      }
    }
  }
}

@keyframes matrix {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(-50%) rotate(45deg);
  }
}

@keyframes textGlow {
  0% {
    text-shadow: 0 0 5px rgba(0, 255, 157, 0.3);
  }
  100% {
    text-shadow: 0 0 15px rgba(0, 255, 157, 0.5);
  }
}

@keyframes scanLine {
  0% {
    transform: scaleX(0);
    opacity: 0;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
  100% {
    transform: scaleX(0);
    opacity: 0;
  }
}

@keyframes contentGlow {
  0% {
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.1);
  }
  100% {
    box-shadow: 0 0 40px rgba(0, 255, 157, 0.2);
  }
}

@keyframes heightAnim {
  0%, 100% {
    height: 0;
    opacity: 0;
  }
  50% {
    height: 100%;
    opacity: 1;
  }
}

@keyframes btnGlow {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes arrowMove {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
}

@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media screen and (max-width: 768px) {
  .page-content {
    padding: 20px;

    .lab-intro {
      font-size: @fs-small;
      grid-template-columns: 1fr;
      gap: 20px;

      &-info {
        gap: 15px;
        padding: 15px;

        &__content {
          text-indent: 2em;
        }

        .go {
          margin-top: 10px;
        }
      }

      &-img {
        height: 300px;
      }
    }
  }
}
</style>
